package com.dwj.auto.comment.common.enums;

public enum StockMarket {
        S(0.001, 0),
        H(0.0002, 1.00);

        StockMarket(double commissionRate, double lowest) {
            this.commissionRate = commissionRate;
            this.lowest = lowest;
        }

        private double commissionRate;
        private double lowest;

        public double getCommissionRate() {
            return commissionRate;
        }

        public void setCommissionRate(double commissionRate) {
            this.commissionRate = commissionRate;
        }

        public double getLowest() {
            return lowest;
        }

        public void setLowest(double lowest) {
            this.lowest = lowest;
        }
        
        public static StockMarket getValueOf(String market){
            for (StockMarket value : StockMarket.values()) {
                if(value.name().equals(market)){
                    return value;
                }
            }
            return null;
        }
    }